using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._Publishing
{
    /// <summary>
    /// <para>Replace Web Layer</para>
    /// <para>Replaces the content of a web layer in a portal with the content of another web layer.</para>
    /// <para>将门户中 Web 图层的内容替换为另一个 Web 图层的内容。</para>
    /// </summary>    
    [DisplayName("Replace Web Layer")]
    public class ReplaceWebLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ReplaceWebLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_target_layer">
        /// <para>Target Layer</para>
        /// <para><xdoc>
        ///   <para>The web layer to be replaced. In addition to a layer or catalog path, it can also be specified using the item ID or service URL of one of the following:
        ///   <bulletList>
        ///     <bullet_item>Vector tile  </bullet_item><para/>
        ///     <bullet_item>Tile layer  </bullet_item><para/>
        ///     <bullet_item>Scene layer published from one of the following sources:
        ///       <bulletList>
        ///         <bullet_item>Scene layer package      </bullet_item><para/>
        ///         <bullet_item>Referenced scene cache in folder or cloud data stores      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>要替换的 Web 图层。除了图层或目录路径外，还可以使用以下任一的项目 ID 或服务 URL 来指定该路径：
        ///   <bulletList>
        ///     <bullet_item>矢量磁贴</bullet_item><para/>
        ///     <bullet_item>切片图层</bullet_item><para/>
        /// <bullet_item>从以下来源之一发布的场景图层：
        ///       <bulletList>
        ///         <bullet_item>场景图层包</bullet_item><para/>
        ///         <bullet_item>文件夹或云数据存储中的引用场景缓存</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_archive_layer_name">
        /// <para>Archive Layer Name</para>
        /// <para>The web layer that is replaced remains in the portal as an archive layer. Provide a unique name for the archive layer.</para>
        /// <para>被替换的 Web 图层将作为存档图层保留在门户中。为存档图层提供唯一名称。</para>
        /// </param>
        /// <param name="_update_layer">
        /// <para>Update Layer</para>
        /// <para><xdoc>
        ///   <para>The replacement web layer. In addition to a layer or catalog path, it can also be specified using the item ID or service URL of one of the following:
        ///   <bulletList>
        ///     <bullet_item>Vector tile  </bullet_item><para/>
        ///     <bullet_item>Tile layer  </bullet_item><para/>
        ///     <bullet_item>Scene layer published from one of the following sources:
        ///       <bulletList>
        ///         <bullet_item>Scene layer package      </bullet_item><para/>
        ///         <bullet_item>Referenced scene cache in folder or cloud data stores      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>替换 Web 图层。除了图层或目录路径外，还可以使用以下任一的项目 ID 或服务 URL 来指定该路径：
        ///   <bulletList>
        ///     <bullet_item>矢量磁贴</bullet_item><para/>
        ///     <bullet_item>切片图层</bullet_item><para/>
        /// <bullet_item>从以下来源之一发布的场景图层：
        ///       <bulletList>
        ///         <bullet_item>场景图层包</bullet_item><para/>
        ///         <bullet_item>文件夹或云数据存储中的引用场景缓存</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public ReplaceWebLayer(object _target_layer, object _archive_layer_name, object _update_layer)
        {
            this._target_layer = _target_layer;
            this._archive_layer_name = _archive_layer_name;
            this._update_layer = _update_layer;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Replace Web Layer";

        public override string CallName => "server.ReplaceWebLayer";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_target_layer, _archive_layer_name, _update_layer, _replace_item_info.GetGPValue(), _updated_target_layer, _create_new_item.GetGPValue()];

        /// <summary>
        /// <para>Target Layer</para>
        /// <para><xdoc>
        ///   <para>The web layer to be replaced. In addition to a layer or catalog path, it can also be specified using the item ID or service URL of one of the following:
        ///   <bulletList>
        ///     <bullet_item>Vector tile  </bullet_item><para/>
        ///     <bullet_item>Tile layer  </bullet_item><para/>
        ///     <bullet_item>Scene layer published from one of the following sources:
        ///       <bulletList>
        ///         <bullet_item>Scene layer package      </bullet_item><para/>
        ///         <bullet_item>Referenced scene cache in folder or cloud data stores      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>要替换的 Web 图层。除了图层或目录路径外，还可以使用以下任一的项目 ID 或服务 URL 来指定该路径：
        ///   <bulletList>
        ///     <bullet_item>矢量磁贴</bullet_item><para/>
        ///     <bullet_item>切片图层</bullet_item><para/>
        /// <bullet_item>从以下来源之一发布的场景图层：
        ///       <bulletList>
        ///         <bullet_item>场景图层包</bullet_item><para/>
        ///         <bullet_item>文件夹或云数据存储中的引用场景缓存</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_layer { get; set; }


        /// <summary>
        /// <para>Archive Layer Name</para>
        /// <para>The web layer that is replaced remains in the portal as an archive layer. Provide a unique name for the archive layer.</para>
        /// <para>被替换的 Web 图层将作为存档图层保留在门户中。为存档图层提供唯一名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Archive Layer Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _archive_layer_name { get; set; }


        /// <summary>
        /// <para>Update Layer</para>
        /// <para><xdoc>
        ///   <para>The replacement web layer. In addition to a layer or catalog path, it can also be specified using the item ID or service URL of one of the following:
        ///   <bulletList>
        ///     <bullet_item>Vector tile  </bullet_item><para/>
        ///     <bullet_item>Tile layer  </bullet_item><para/>
        ///     <bullet_item>Scene layer published from one of the following sources:
        ///       <bulletList>
        ///         <bullet_item>Scene layer package      </bullet_item><para/>
        ///         <bullet_item>Referenced scene cache in folder or cloud data stores      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>替换 Web 图层。除了图层或目录路径外，还可以使用以下任一的项目 ID 或服务 URL 来指定该路径：
        ///   <bulletList>
        ///     <bullet_item>矢量磁贴</bullet_item><para/>
        ///     <bullet_item>切片图层</bullet_item><para/>
        /// <bullet_item>从以下来源之一发布的场景图层：
        ///       <bulletList>
        ///         <bullet_item>场景图层包</bullet_item><para/>
        ///         <bullet_item>文件夹或云数据存储中的引用场景缓存</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _update_layer { get; set; }


        /// <summary>
        /// <para>Replace Item Information</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the thumbnail image, summary, description, and tags will be replaced. In either case, the item's credits (attribution), terms of use, and created from information are not replaced.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The target layer's item information is not replaced when the layer is updated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The target layer's item information is replaced by the update layer's item information.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否替换缩略图、摘要、说明和标签。无论哪种情况，商品的版权归属（归属）、使用条款和根据信息创建的内容都不会被替换。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 更新图层时，目标图层的项目信息不会被替换。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 目标图层的项目信息将替换为更新图层的项目信息。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Replace Item Information")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _replace_item_info_value _replace_item_info { get; set; } = _replace_item_info_value._false;

        public enum _replace_item_info_value
        {
            /// <summary>
            /// <para>REPLACE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REPLACE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Target Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Target Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_target_layer { get; set; }


        /// <summary>
        /// <para>Create New Item For Archive Layer</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a new item is created for the archive layer. This option is supported on portals in ArcGIS Online and ArcGIS Enterprise 10.8 or later.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The item ID of the update layer is used for the archive layer. This is the default for vector tile layers and tile layers.</bullet_item><para/>
        ///     <bullet_item>Checked—A new item ID is created for the archive layer. This is the default for scene layers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否为存档图层创建新项目。ArcGIS Online 和 ArcGIS Enterprise 10.8 或更高版本中的门户支持此选项。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 更新图层的项目 ID 用于存档图层。这是矢量切片图层和切片图层的默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 为存档图层创建新项目 ID。这是场景图层的默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create New Item For Archive Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _create_new_item_value _create_new_item { get; set; } = _create_new_item_value._false;

        public enum _create_new_item_value
        {
            /// <summary>
            /// <para>TRUE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("TRUE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>FALSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FALSE")]
            [GPEnumValue("false")]
            _false,

        }

        public ReplaceWebLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}